<?php
/**
 * ===============================================
 * 版权所有 2019-2050 青岛铁锤科技有限公司，并保留所有权利。
 * 网站地址: http://www.huaxianling.com
 * ===============================================
 * Author: Alex
 * Created Time: 2019/6/23 9:08
 * Modified Time: 2019/6/23 9:08
 * Version: 2.0
 */
namespace App\Models;
use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
class Member extends Model implements AuthenticatableContract
{
    use Authenticatable;
    protected $table = 'member';
    protected $guarded = [];

	protected $hidden = [
		'open_id',
		'skey',
		'session_key',
		'updated_at',
	];
    public function storeLike(){
    	return $this->hasMany(StoreLike::class,'member_id','id');
    }

    public function order(){
    	return $this->hasMany(Order::class,'member_id','id');
    }

    public function memberCard(){
    	return $this->hasMany(MemberCard::class, 'member_id','id');
    }

    public function portfolioLike(){
    	return $this->hasMany(UserPortfolioLike::class,'member_id','id');
    }

    public function couponList(){
        return $this->hasMany(CouponList::class, 'member_id','id');
    }

}